﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BaoJian;

namespace BaoJian.member.myinfo
{
    public partial class ShowMyInfo : System.Web.UI.Page
    {
        private string UserID;
        protected void Page_Load(object sender, EventArgs e)
        {
            UserID = HttpContext.Current.User.Identity.Name;
            if (!Page.IsPostBack)
            {
                Tools.Common.IsAuthenticated();
                BindData();
            }
        }

        void BindData()
        {
            LYQ.BLL.Users bll = new LYQ.BLL.Users();
            LYQ.Model.Users model = bll.GetModel(UserID);
            lblUserID.Text = model.UserID;
            lblUserName.Text = model.UserName;
            lblAddress.Text = model.Address;
            lblTel.Text = model.Tel;
            lblMobile.Text = model.Mobile;
            lblRegisterTime.Text = model.RegisterTime.ToString();
            lblEMail.Text = model.EMail;
            lblBonusPoints.Text = model.BonusPoints.ToString();          
            lblBirthday.Text = model.Birthday.ToString();
            lblSex.Text = model.Sex;
            lblProvince.Text = model.Province;
            lblLoginCount.Text = model.LoginCount.ToString();
        }
    }
}
